﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using FinPlusAssembler;
using FinPlusInterfaces;

namespace FinPlusBaseCore
{
    public static class PodExtension
    {
        public static string Display(this IPod pod, string[] displayFields)
        {
            return string.Join("$", (from field in displayFields join beans in pod on field equals beans.Name select beans.Display()).ToArray());
        }

        public static string SortKey(this IPod pod, string[] sortOrders)
        {
            return string.Join("|", (from sortOrder in sortOrders join beans in pod on sortOrder equals beans.Name select beans.ToString()).ToArray());
        }
    }
}
